package br.hibernate.conector;

import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;



public class HibernateUtil {
    
    private static Session sessao = BuilderSessionFactory().openSession();

	private static SessionFactory BuilderSessionFactory() {
		Configuration conf = new Configuration();
		conf.configure("hibernate.cfg.xml");
		return conf.buildSessionFactory();
	}

	public static Session getSessao() {
		return sessao;
	}
	
}
